package com.qd.panda.model;

import com.baomidou.mybatisplus.annotation.*;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import lombok.EqualsAndHashCode;
import lombok.Getter;
import lombok.Setter;
import lombok.experimental.Accessors;

import java.io.Serializable;


/**
 * 加油站扩展信息
 *
 * @author sjk
 */
@Getter
@Setter
@Accessors(chain = true)
@EqualsAndHashCode(callSuper = false)
@TableName("panda_car_park_gas_station")
public class CarParkGasStation extends Model<CarParkGasStation> implements Serializable {

    private static final long serialVersionUID = 1L;

    /**
     * 主键
     */
    @TableId(value = "p_id", type = IdType.ASSIGN_ID)
    private String pId;
    /**
     * 加油站ID:同步第三方数据的加油站ID
     */
    @TableField("station_id")
    private String stationId;
    /**
     * 折扣
     */
    @TableField("customer_discount")
    private Double customerDiscount;
    /**
     * 加油站公司名称
     */
    @TableField("gas_station_company_name")
    private String gasStationCompanyName;
    /**
     * 枪号，逗号隔开
     */
    @TableField("nozzle_numbers")
    private String nozzleNumbers;
    /**
     * 油站类型
     */
    @TableField("station_type")
    private String stationType;
    /**
     * 广告
     * 该字段如果为空或者为null也需要更新到数据库
     */
    @TableField(value = "advert", updateStrategy = FieldStrategy.ALWAYS)
    private String advert;

    public void freeData() {
        this.pId = null;
        this.stationId = null;
        this.customerDiscount = null;
        this.gasStationCompanyName = null;
        this.nozzleNumbers = null;
        this.stationType = null;
        this.advert = null;
    }

}
